package Level_one;

import java.util.Random;
import java.util.Scanner;

public class Six {
    public static void main(String[] args) {
        System.out.println("请输入一个1-100之间的数字");
        int guess = new Scanner(System.in).nextInt();
        int i = new Random().nextInt(100) + 1;
        while (true) {
            if (guess == i) {
                System.out.println("猜对了");
                break;
            } else if (guess > i) {
                System.out.println("猜大了");
                 guess = new Scanner(System.in).nextInt();
            } else {
                System.out.println("猜小了");
                 guess = new Scanner(System.in).nextInt();
            }
        }
    }
}
